
//
//int main()
//{
//	struct Student
//	{
//		int num;
//		char name[20];
//		float score;
//	}student1,student2;
//	scanf("%d%s%f", &student1.num, &student1.name, &student1.score);
//	scanf("%d%s%f", &student2.num, &student2.name, &student2.score);
//	printf("the higher score is\n");
//	if (student1.score > student2.score)
//		printf("%d %s %6.2f\n", student1.num, student1.name, student1.score);
//	else if(student1.score<student2.score)
//	printf("%d %s %6.2f\n", student2.num, student2.name, student2.score);
//	else
//	{
//		printf("%d %s %6.2f\n", student1.num, student1.name, student1.score);
//		printf("%d %s %6.2f\n", student2.num, student2.name, student2.score);
//
//	}
//	return 0;
//
//}
//#define _CRT_SECURE_NO_WARNINGS 1
//#include<stdio.h>
//#include<string.h>
//struct person
//{
//	char name[20];
//	int count;
//}leader[3] = {"li",0,"zhang",0,"sun",0};
//int main()
//{
//	int i, j;
//	char leader_name[20];
//	for (i = 1;i <=10;i++)
//	{
//		scanf("%s", leader_name);
//		for (j = 0;j < 3;j++)
//		{
//			if (strcmp(leader_name, leader[j].name) == 0)leader[j].count++;
//		}
//	}	
//		printf("\nResult:\n");
//		for (i = 0;i < 3;i++)
//		{
//			printf("%5s:%d\n", leader[i].name, leader[i].count);
//		}
//		return 0;
//	
//}

#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
struct
{
	int num;
	char name[10];
	char sex;
	char job;
	union
	{
		int clas;
		char position[10];
	}category;
}person[2];
int main()
{
	int i;
	for (i = 0;i < 2;i++)
	{
		printf("please enter the data of person\n");
		scanf("%d %s %c %c", &person[i].num, &person[i].name, person[i].sex, &person[i].job);
		if (person[i].job == 's')
			scanf("%d", &person[i].category.clas);
		else if (person[i].job == 't')
			scanf("%s", &person[i].category.position);
		else
			printf("input error!");
	}
	printf("\n");
	printf("no.   name       sex job class/position\n");
	for (i = 0;i < 2;i++)
	{
		if (person[i].job == 's')
			printf("%-6d%-10s%-4c%-4%c-10d\n", &person[i].num, &person[i].name, person[i].sex, &person[i].job, person[i].category.clas);
		else
			printf("%-6d%-10s%-4c%-4%c-10d\n", &person[i].num, &person[i].name, person[i].sex, &person[i].job, person[i].category.position);


	}
	return 0;
}